<!--销的计算-->
<template>
  <div class="sum" style="width: 100%;height: 100%;overflow-x:auto;overflow-y:auto">
    <!--    <div style="width: 100%;height: 90%;">-->
    <a-row  style="width: 100%;height: 100%;">
      <a-col :span="12" class="left" style="height: 100%">
        <a-row class="left_top" style="box-shadow: 1.5px 1.5px 2px #aaaaaa;">
          <a-row class="left_top_1" style="height: 8%;">
            <div style="height: 90%;width: 100%;margin-left: -1%">
              <strong style="height: 100%"><label class="title" style="height: 80%;display: block;width:100%;background: #f2f2f2">输入参数</label></strong>
            </div>
          </a-row>
          <a-row class="left_top_2" style="height: 30%;box-shadow: 1.5px 1.5px 2px #aaaaaa;">
            <a-row class="title1" style="height: 18%;">
              <div style="">
                <label style="display: block;margin-top: -5px;">载荷参数</label>
              </div>
            </a-row>
            <a-row class="left_top_2_input" style="height: 82%;">
              <a-col :span="12" style="height: 100%;" >
                <a-row style="width: 100%;height: 50%;margin-top: 18px">
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li style="margin-left: 80px" >受载形式</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%">
                    <select style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap" v-model="params_41.type">
                      <option value="1" >拉杆中的横向轴销</option>
                      <option value="2">受弯曲力的导销</option>
                      <option value="3">受扭矩的横销</option>
                      <option value="4">受扭矩的纵销</option>
                      <option value="5">受扭矩的圆周分布销</option>
                    </select>
                  </a-col>
                </a-row>
                <a-row style="width: 100%;height: 50%">
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li style="margin-left: 80px">使用系数</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li><input type="text" v-model="params_41.KA" /></li>
                    </ul>
                  </a-col>
                </a-row>
              </a-col>
              <a-col :span="12" style="height: 100%">
                <a-row style="width: 100%;height: 50%;margin-top: 18px">
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li style="margin-left: 80px" >载荷类型</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%">
                    <select style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap" v-model="params_41.loadtype">
                      <option value="0">脉动载荷</option>
                      <option value="-1">交变载荷</option>
                      <option value="1">静载荷</option>
                    </select>
                  </a-col>
                </a-row>
                <a-row style="width: 100%;height: 50%">
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='1' ||params_41.type==='2'">
                    <ul>
                      <li style="margin-left: 85px">外力（N）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='3'||params_41.type==='4'||params_41.type==='5'">
                    <ul>
                      <li style="margin-left: 70px">扭矩（Nmm）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li><input type="text" v-model="params_41.F_s1"/></li>
                    </ul>
                  </a-col>
                </a-row>
              </a-col>
            </a-row>
          </a-row>
          <a-row class="left_top_3" style="height: 30%;box-shadow: 1.5px 1.5px 2px #aaaaaa;">
            <a-row class="title2" style="height: 18%;">
              <div>
                <label style="display: block;margin-top: -5px;">几何参数</label>
              </div>
            </a-row>
            <a-row  class="left_top_3_input" style="height: 82%;" v-if="params_41.type==='1' || params_41.type==='2' || params_41.type==='3'">
              <a-col :span="12" style="height: 100%;" >
                <a-row style="width: 100%;height: 50%;margin-top: 18px">
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li style="margin-left: 50px" >销的外径（mm）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li><input type="text" v-model="params_41.d"/></li>
                    </ul>
                  </a-col>
                </a-row>
                <a-row style="width: 100%;height: 50%">
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li style="margin-left: 50px">销的内径（mm）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li><input type="text" v-model="params_41.di" /></li>
                    </ul>
                  </a-col>
                </a-row>
              </a-col>
              <a-col :span="12" style="height: 100%">
                <a-row style="width: 100%;height: 50%;margin-top: 18px">
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='1'">
                    <ul>
                      <li style="margin-left: 68px" >叉厚度（mm）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='2'">
                    <ul>
                      <li style="margin-left: 42px" >销插入深度（mm）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='3'">
                    <ul>
                      <li style="margin-left: 76px" >毂厚（mm）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li><input type="text" v-model="params_41.b_s" /></li>
                    </ul>
                  </a-col>
                </a-row>
                <a-row style="width: 100%;height: 50%">
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='1'">
                    <ul>
                      <li style="margin-left: 8px">销与拉杆配合长度（mm）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='2'">
                    <ul>
                      <li style="margin-left: 80px">力臂（mm）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='3'">
                    <ul>
                      <li style="margin-left: 64px">轴直径（mm）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li><input type="text" v-model="params_41.l_s"/></li>
                    </ul>
                  </a-col>
                </a-row>
              </a-col>
            </a-row>
            <!--            对应受载形式为4-->
            <a-row class="left_top_3_input_" style="height: 82%;" v-if="params_41.type==='4'">
              <a-col :span="12" class="l-l" style="height: 100%">
                <a-col class="l-l-l" :span="12" style="height: 100%">
                  <div>
                    <ul style="text-align: right;margin-right: 61px;margin-top: 10px">
                      <li>销数目</li>
                      <li>销的外径（mm）</li>
                      <li>销的内径（mm）</li>
                    </ul>
                  </div>
                </a-col>
                <a-col class="l-l-r" :span="12" style="height: 100%">
                  <div>
                    <ul style="margin-top: 10px">
                      <li><input type="text" v-model="params_41.m"/></li>
                      <li><input type="text" v-model="params_41.d"/></li>
                      <li><input type="text" v-model="params_41.di" /></li>
                    </ul>
                  </div>
                </a-col>
              </a-col>
              <a-col :span="12" class="l-r" style="height: 100%">


                <a-row style="height: 50%;">
                  <a-col :span="12" style="height: 100%;">
                    <div>
                      <ul style="margin-top: 10px;margin-left: 76px">
                        <li>销长（mm）</li>
                        <!--                        <li>轴直径（mm）</li>-->
                      </ul>
                    </div>
                  </a-col>
                  <a-col :span="12" style="height: 100%;">
                    <div>
                      <ul style="margin-top: 10px">
                        <li><input type="text" v-model="params_41.l_s4"/></li>
                        <!--                        <li><input type="text" /></li>-->
                      </ul>
                    </div>
                  </a-col>
                </a-row>

                <a-row style="height: 50%;">
                  <a-col :span="12" style="height: 100%;">
                    <div >
                      <ul style="margin-top: 20px;margin-left: 64px">
                        <!--                        <li>销长（mm）</li>-->
                        <li>轴直径（mm）</li>
                      </ul>
                    </div>
                  </a-col>
                  <a-col :span="12" style="height: 100%;">
                    <div>
                      <ul style="margin-top: 10px">
                        <li><input type="text" v-model="params_41.D_s4" /></li>
                        <!--                        <li><input type="text" /></li>-->
                      </ul>
                    </div>
                  </a-col>
                </a-row>
              </a-col>
            </a-row>


            <!--            受载形式为5-->
            <a-row class="left_top_3_input_" style="height: 82%;" v-if="params_41.type==='5'">
              <a-col :span="12" class="l-l" style="height: 100%">
                <a-col class="l-l-l" :span="12" style="height: 100%">
                  <div>
                    <ul style="text-align: right;margin-right: 63px;margin-top: 10px">
                      <li>销数目</li>
                      <li>销的外径（mm）</li>
                      <li>销的内径（mm）</li>
                    </ul>
                  </div>
                </a-col>
                <a-col class="l-l-r" :span="12" style="height: 100%">
                  <div>
                    <ul style="margin-top: 10px">
                      <li><input type="text" v-model="params_41.m"/></li>
                      <li><input type="text" v-model="params_41.d"/></li>
                      <li><input type="text" v-model="params_41.di" /></li>
                    </ul>
                  </div>
                </a-col>
              </a-col>

              <a-col :span="12" class="l-r" style="height: 100%">
                <a-col class="l-r-l" :span="12" style="height: 100%">
                  <div>
                    <ul style="text-align: right;margin-right: 60px;margin-top: 12px;font-size: 13px">
                      <li>销与部件1配合长度（mm）</li>
                      <li>销与部件2配合长度（mm）</li>
                      <li>销分布圆直径（mm）</li>
                    </ul>
                  </div>
                </a-col>
                <a-col class="l-r-r" :span="12" style="height: 100%">
                  <div>
                    <ul style="margin-top: 10px">
                      <li><input type="text" v-model="params_41.t1_s" /></li>
                      <li><input type="text" v-model="params_41.t2_s" /></li>
                      <li><input type="text" v-model="params_41.D_s5"/></li>
                    </ul>
                  </div>
                </a-col>
              </a-col>
            </a-row>

            <!--            -->
          </a-row>
          <a-row class="left_top_4" style="height: 32%;box-shadow: 1.5px 1.5px 2px #aaaaaa;">
            <a-row class="title3" style="height: 18%;width:100%;position: relative">
              <div style="width: 100%;height: 100%;position: absolute;margin-top: -4px">
                材料参数
              </div>
            </a-row>
            <a-row class="left_top_3_input" style="height: 82%;">
              <a-col :span="12" style="height: 100%;" >
                <a-row style="width: 100%;height: 50%;margin-top: 18px">
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li style="margin-left: 0px" >销的许用剪切应力（MPa）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li><input type="text" v-model="params_41.tab_zul"/></li>
                      <li><button  style="width: 20px;float: right;margin-top: -32px;margin-right: 46px" type="primary" @click="showModal">!</button>
                        <a-modal
                            title="销材料许用应力表"
                            :visible="visible"

                            @ok="handleOk"
                            @cancel="handleCancel"
                        >

                          <img src="../../assets/image/image_41_6.png" height="245" width="488"/></a-modal>
                      </li>
                    </ul>
                  </a-col>
                </a-row>
                <a-row style="width: 100%;height: 50%">
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='1'||params_41.type==='2'">
                    <ul>
                      <li style="margin-left: 10px">销许用弯曲应力（MPa）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='3'||params_41.type==='4'">
                    <ul style="text-align: right;margin-right: 57px">
                      <li style="margin-left: 10px">轴许用压应力（MPa）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%" v-if="params_41.type!=='5'">
                    <ul>
                      <li><input type="text" v-model="params_41.sigma_bzul_s1"/></li>
                    </ul>
                  </a-col>
                </a-row>
              </a-col>

              <a-col :span="12" style="height: 100%">
                <a-row style="width: 100%;height: 50%;margin-top: 18px">
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='1'">
                    <ul>
                      <li style="margin-left: 25px" >叉许用压应力（MPa）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='2'">
                    <ul>
                      <li style="margin-left: 12px" >部件许用压应力（MPa）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='3'||params_41.type==='4'">
                    <ul>
                      <li style="margin-left: 20px" >毂许用压应力（MPa）</li>
                    </ul>
                  </a-col>

                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='5'">
                    <ul>
                      <li style="margin-left: 8px;font-size: 14px;margin-top: 3px" >部件1许用压应力（MPa）</li>
                    </ul>
                  </a-col>

                  <a-col :span="12" style="height: 100%">
                    <ul>
                      <li><input type="text" v-model="params_41.p_fork_zul_s" /></li>
                    </ul>
                  </a-col>
                </a-row>
                <a-row style="width: 100%;height: 50%">
                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='1'">
                    <ul>
                      <li style="margin-left: 25px">杆许用压应力（MPa）</li>
                    </ul>
                  </a-col>

                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='5'">
                    <ul>
                      <li style="margin-left: 8px;font-size: 14px;margin-top: 3px">部件2许用压应力（MPa）</li>
                    </ul>
                  </a-col>

                  <a-col :span="12" style="height: 100%" v-if="params_41.type==='2'">
                    <ul>
                      <li style="margin-left: 25px">销许用压应力（MPa）</li>
                    </ul>
                  </a-col>
                  <a-col :span="12" style="height: 100%"  v-if="params_41.type==='1' || params_41.type==='2' || params_41.type==='5'">
                    <ul>
                      <li v-if="params_41.type==='1'||params_41.type==='2'"><input type="text" v-model="params_41.p_rod_zul_s1"/></li>
                      <li v-if="params_41.type==='5'"><input type="text" v-model="params_41.p_hub_zul_s5"/></li>
                    </ul>
                  </a-col>
                </a-row>
              </a-col>
            </a-row>
          </a-row>
        </a-row>
        <a-row class="left_mid">
          <div >
            <button style="margin-left: 76%;margin-top: 15px;width: 108px" @click="calculation">计算</button>
          </div>
        </a-row>
        <a-row class="left_foot" style="box-shadow: 1.5px 1.5px 2px #aaaaaa;">
          <a-row class="title4" style="height: 15%;">
            <div style="">
              <label style="display: block;margin-top: 2px;margin-left: 16px;border-radius: 5px;background-color: #f2f2f2;">输出参数</label>
            </div>
          </a-row>
          <a-row class="left_foot_input" style="height: 85%;">
            <a-col :span="12" style="height: 100%;position: relative">
              <div class="left_foot_input_left_left" style="position: absolute">
                <ul style="margin-top: 10px;text-align: right;margin-left: 10px">
                  <li>销的剪切应力（MPa）</li>
                  <li v-if="params_41.type==='1'||params_41.type==='2'">销弯曲应力（MPa）</li>
                  <li v-if="params_41.type==='1'">杆的表面压应力（MPa）</li>
                  <li v-if="params_41.type==='1'">叉的表面压应力（MPa）</li>
                  <li v-if="params_41.type==='2'">销的表面压应力（MPa）</li>
                  <li v-if="params_41.type==='2'">部件表面压应力（MPa）</li>
                  <li v-if="params_41.type==='3'||params_41.type==='4'">轴的表面压应力（MPa）</li>
                  <li v-if="params_41.type==='3'||params_41.type==='4'">毂的表面压应力（MPa）</li>
                  <li v-if="params_41.type==='5'">部件1的表面压应力（MPa）</li>
                  <li v-if="params_41.type==='5'">部件2的表面压应力（MPa）</li>
                </ul>
              </div>
              <div class="left_foot_input_left_right" style="margin-left: 200px">
                <ul style="margin-top: 10px;text-align: left">
                  <li>{{result_data.result1}}</li>
                  <li v-if="params_41.type==='1'||params_41.type==='2'">{{result_data.result3}}</li>
                  <li v-if="params_41.type==='1'">{{result_data.result5}}</li>
                  <li v-if="params_41.type==='1'">{{result_data.result7}}</li>
                  <!--                  -->
                  <li v-if="params_41.type==='2'">{{result_data.result9}}</li>
                  <li v-if="params_41.type==='2'">{{result_data.result11}}</li>
                  <li v-if="params_41.type==='3'||params_41.type==='4'||params_41.type==='5'">{{result_data.result12}}</li>
                  <li v-if="params_41.type==='3'||params_41.type==='4'||params_41.type==='5'">{{result_data.result14}}</li>

                </ul>
              </div>
            </a-col>
            <a-col :span="12" style="height: 100%;position: relative">

              <!--          为5的时候单独写       -->
              <div v-if="params_41.type==='5'" style="position: absolute" class="left_foot_input_right_left">
                <ul style="margin-top: 11px;font-size: 10px;text-align: right">
                  <li>销的剪切安全系数</li>
                  <li>部件1的抗压安全系数（MPa）</li>
                  <li>部件2的抗压安全系数（MPa）</li>
                </ul>
              </div>
              <div class="left_foot_input_right_right" style="position:absolute;margin-left: 200px;margin-top: 9px" v-if="params_41.type==='5'">
                <ul>
                  <li>{{result_data.result2}}</li>
                  <li>{{result_data.result13}}</li>
                  <li>{{result_data.result15}}</li>
                  <!--                  <li>1</li>-->
                  <!--                  <li>2</li>-->
                  <!--                  <li>3</li>-->
                </ul>
              </div>
              <!--              -->
              <div v-if="params_41.type==='5'">

              </div>
              <!--              -->
              <div class="left_foot_input_right_left" style="position: absolute" v-if="params_41.type!=='5'">
                <ul style="margin-top: 10px;text-align: right;margin-left: 35px">
                  <li>销的剪切安全系数</li>
                  <li v-if="params_41.type==='1'||params_41.type==='2'">销的弯曲安全系数</li>
                  <li v-if="params_41.type==='1'">杆的抗压安全系数</li>
                  <li v-if="params_41.type==='1'">叉的抗压安全系数</li>
                  <li v-if="params_41.type==='2'">销的抗压安全系数</li>
                  <li v-if="params_41.type==='2'">部件抗压安全系数</li>
                  <li v-if="params_41.type==='3'||params_41.type==='4'">轴的抗压安全系数</li>
                  <li v-if="params_41.type==='3'||params_41.type==='4'">毂的抗压安全系数</li>
                  <!--                  <li v-if="params_41.type==='5'">部件1的抗压安全系数（MPa）</li>-->
                  <!--                  <li v-if="params_41.type==='5'">部件2的抗压安全系数（MPa）</li>-->
                </ul>
              </div>
              <div class="left_foot_input_right_right" style="" v-if="params_41.type!=='5'">
                <ul style="margin-top: 10px;text-align: left;margin-left: 200px">
                  <li>{{result_data.result2}}</li>
                  <li v-if="params_41.type==='1'||params_41.type==='2'">{{result_data.result4}}</li>
                  <li v-if="params_41.type==='1'">{{result_data.result6}}</li>
                  <!--                  -->
                  <li v-if="params_41.type==='1'">{{result_data.result8}}</li>
                  <li v-if="params_41.type==='2'">{{result_data.result10}}</li>
                  <li v-if="params_41.type==='2'">Static Text</li>
                  <!--                  //<li v-if="params_41.type==='2'">{{result_data.result11}}</li>-->
                  <li v-if="params_41.type==='3'||params_41.type==='4'">{{result_data.result13}}</li>
                  <li v-if="params_41.type==='3'||params_41.type==='4'">{{result_data.result15}}</li>

                  <!--                  -->

                  <!--                  <li>1</li>-->
                  <!--                  <li>2</li>-->
                  <!--                  <li>3</li>-->
                  <!--                  <li>4</li>-->
                </ul>
              </div>
              <!--                 -->

              <!--              -->
            </a-col>
          </a-row>
        </a-row>
      </a-col>
      <a-col :span="12" class="right" style="height: 100%;">
        <div class="div_right" style="margin-top: 6.5%; margin-left:2%;border: solid;width: 700px;height: 600px" v-if="params_41.type==='1'">
          <div class="div_rightup" style="margin-top: 120px;text-align: center" >
            <img alt="受载形式参考图" src="../../assets/image/image_41_5.jpg" />
          </div>
        </div >

        <div class="div_right" style="border: solid;width: 700px;height: 600px;margin-top: 23px" v-if="params_41.type==='2'">
          <div class="div_rightup" style="margin-top: 80px;text-align: center" >
            <img alt="受载形式参考图" src="../../assets/image/image_41_1.jpg" />
          </div>
        </div >

        <div class="div_right" style="border: solid;width: 700px;height: 600px;margin-top: 23px" v-if="params_41.type==='3'">
          <div class="div_rightup" style="margin-top: 70px;text-align: center" >
            <img alt="受载形式参考图" src="../../assets/image/image_41_3.jpg" />
          </div>
        </div >

        <div class="div_right" style="border: solid;width: 700px;height: 600px;margin-top: 23px" v-if="params_41.type==='4'">
          <div class="div_rightup" style="margin-top: 70px;text-align: center" >
            <img alt="受载形式参考图" src="../../assets/image/image_41_4.jpg" />
          </div>
        </div >

        <div class="div_right" style="border: solid;width: 700px;height: 600px;margin-top: 23px" v-if="params_41.type==='5'">
          <div class="div_rightup" style="margin-top: 70px;text-align: center" >
            <img alt="受载形式参考图" src="../../assets/image/image_41_2.jpg" />
          </div>
        </div >

      </a-col>
    </a-row>
  </div>
</template>


<script>


import {pin_strength_calculation} from "@/api/file";

export default {
  created() {
    document.title='销的计算'
    this.$store.state.file.key = 41//设置key为自己的页面编号
  },
  name: "pin_strength_calculation",
  data(){//输出参数
      return {//用return包裹后的数据变量只在当前组件生效，不会影响其他组件
        visible: false,
        confirmLoading: false,//图片弹出
        result_data: {
        result1:'Static Text',
        result2:'Static Text',
        result3:'Static Text',
        result4:'Static Text',
        result5:'Static Text',
        result6:'Static Text',
        result7:'Static Text',
        result8:'Static Text',
        result9:'Static Text',
        result10:'Static Text',
        result11:'Static Text',
        result12:'Static Text',
        result13:'Static Text',
        result14:'Static Text',
        result15:'Static Text',
        },

        // input_data:{//输入参数
        //   type:'1',
        //   KA:'1.25',
        //   d:'30',
        //   loadtype:'0',
        //   tab_zul:'50',
        //   m:'1.25',
        //   di:'35',
        //   F_s1:'500',
        //   l_s:'35',
        //   b_s:'15',
        //   sigma_bzul_s1:'60',
        //   p_rod_zul_s1:'60',
        //   p_fork_zul_s:'60',
        //   F_s2:'500',
        //   h_s:'35',
        //   s_s2:'15',
        //   sigma_bzul_s2:'60',
        //   p_pin_zul_s:'60',
        //   p_part_zul_s:'60',
        //   T_s3:'500',
        //   D_s3:'35',
        //   s_s3:'15',
        //   p_shaft_zul_s3:'60',
        //   p_hub_zul_s3:'60',
        //   T_s4:'500',
        //   D_s4:'35',
        //   l_s4:'15',
        //   p_shaft_zul_s4:'60',
        //   p_hub_zul_s4:'60',
        //   T_s5:'500',
        //   D_s5:'35',
        //   t1_s:'15',
        //   t2_s:'500',
        //   n_s:'1.25',
        //   p_shaft_zul_s5:'60',
        //   p_hub_zul_s5:'100',
        // }
        params_41:this.$store.state.file.dataList[41],
      }
  },
  watch: {//学长，这段是测试代码，不用管
    // 如果 `question` 发生改变，这个函数就会运行
    result_data: function (newQuestion, oldQuestion) {

      console.log(oldQuestion);
      console.log(newQuestion);
      console.log(newQuestion.type === '2')
    }
  },
  methods: {
    showModal() {//图片弹出函数
      this.visible = true;
    },
    //点击ok
    handleOk() {

      this.visible = false;
    },
    //点击cancel
    handleCancel() {
      console.log('Clicked cancel button');
      this.visible = false;
    },
   calculation(){//调用接口进行计算，得到结果
     pin_strength_calculation(this.params_41)
         .then(res => {
           this.result_data.result1=res[0];
           this.result_data.result5=res[4];
           this.result_data.result2=res[1];
           this.result_data.result6=res[5];
           this.result_data.result3=res[2];
           this.result_data.result7=res[6];
           this.result_data.result4=res[3];
           this.result_data.result8=res[7];
           //  **********
           this.result_data.result9=res[8];
           this.result_data.result10=res[9];
           this.result_data.result11=res[10];
           this.result_data.result12=res[11];
           this.result_data.result13=res[12];
           this.result_data.result14=res[13];
           this.result_data.result15=res[14];
         })
         .catch(err => {
           this.$message.error(err);
         });
   },
  }
}
</script>

<style scoped>
.title {
  display: block;
  margin-top: 5px;
  margin-left: 10px;
}
.left_top {
  height: 65%;

}
.left_mid {
  height: 8%;

}
.left_foot {
  height: 27%;

}
input {
  text-align: center;
}
ul li{
  list-style: none;
}
</style>
